<template>
  <div class="step">
      <div style="width: 60%;height: 80%;margin: 20px auto">
          <div style="width:100%;height: 15%;background-color: #324157;border-radius: 5px"></div>
          <div style="width:100%;height: 80%;margin: auto">
              <div style="width: 40%;height: 85%;margin: 25px auto">
                <el-descriptions
                    class="margin-top"
                    :column="1"
                    size="medium"
                >
                    <el-descriptions-item label="姓 名:">{{this.userInfo.name}}</el-descriptions-item>
                    <el-descriptions-item label="身份证号:">{{this.userInfo.identity}}</el-descriptions-item>
                    <el-descriptions-item label="学 院:">{{this.userInfo.college}}</el-descriptions-item>
                    <el-descriptions-item label="学 号:">{{this.userInfo.userName}}</el-descriptions-item>
                    <el-descriptions-item label="班 级:">{{this.userInfo.classes}}</el-descriptions-item>
                </el-descriptions>
              </div>
          </div>
          <div style="width:100%;height: 80%;margin: auto">
              确认是本人操作
              <el-button type="success">确认</el-button>
          </div>
      </div>
  </div>
</template>

<script>
import request from '../../utils/request'

export default {
	data() {
		return {
			userInfo: ''
		}
	},
	created() {
		this.getUserInfo();
	},
	methods: {
		getUserInfo() {
			request.get('/api/user/selectSelfInformation',
		    {
		        headers: {'jwtToken': this.$store.getters.getToken}
	        }).then(res => {
			    this.userInfo = res.data;
			    this.birthday = res.data.identity.substring(6, 10) + '-' + res.data.identity.substring(10, 12) + '-' + res.data.identity.substring(12, 14);
		    })
		}
	},
}
</script>

<style lang="less" scoped>
.step {
    width: 100%;
    height: 100%;
    margin: auto;
}
</style>
